package net.xdclass.xdclass.controller;

import net.xdclass.xdclass.service.VideoService;
import net.xdclass.xdclass.utils.JsonData;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("api/test")
public class TempController {
    @Autowired
    VideoService videoService;
    /**
     * 查询视频详情，包含章，集，节
     * @param videoId
     * @return
     */
    @GetMapping("find_detal_by_id")
    public JsonData findDetailById(@RequestParam(value = "video_id",required = true)int videoId){

        return JsonData.buildSuccess(videoService.findDetailById(videoId));

    }
}
